package com.caocaog.market.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.caocaog.market.entity.ShopFareConfig;
import com.caocaog.market.enums.ShopFareConfigEnum;

import javax.annotation.Nullable;

/**
 * 店铺加价配置
 *
 * @author chechen
 * @date 2022-10-29
 */
public interface ShopFareConfigService extends IService<ShopFareConfig> {


    /**
     * 按shopId查询店铺加价配置
     *
     * @param shopId 店铺id
     * @return 店铺加价配置
     */
    @Nullable
    ShopFareConfig findShopFareConfigByShopId(String shopId);


    /**
     * 新增店铺加价配置
     *
     * @param shopFareConfig 店铺加价配置
     * @return 受影响行数
     */
    int addShopFareConfig(ShopFareConfig shopFareConfig);


    /**
     * 更新店铺加价配置
     *
     * @param shopFareConfig 店铺加价配置
     * @return 受影响行数
     */
    int updateShopFareConfig(ShopFareConfig shopFareConfig);


    /**
     * 变更店铺加价配置状态
     *
     * @param shopId             店铺id
     * @param shopFareConfigEnum 加价配置枚举
     * @return 受影响行数
     */
    int changeShopFareConfigState(String shopId, ShopFareConfigEnum shopFareConfigEnum);

}
